package com.ny.demo;

public class Person {
    public String name;
    private int money;

    public void setMoney(int money) {
        if (money < 0) {
            System.out.println("你输入的金额不符");
        } else {
            this.money = money;
        }
    }
    public int getMoney() {
        return money;
    }
}
